let arr = [1,2,3,4,5,6];
let arr2 = [1,2,3,4,5,6];

//用来比较两个数组完全相同,浅比较，只比较一层
let result = arr.every((item,index)=>item === arr2[index]);
console.log(result);